package com.fql.research.sys.controller;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.fql.research.sys.domain.User;
import com.fql.research.sys.service.UserService;

/**
 * 用户controller
 * 
 * @author fanql 2017年7月11日
 *
 */
@Controller
@RequestMapping("/sys/user")
public class UserController {
	@Autowired
	private UserService userService;

	@RequestMapping(value = "/updateUser")
	@RequiresPermissions("sys:user:update")
	public String updateUser() {
		User user = new User();
		user.setUserId(1);
		user.setUserName("范青龙");
		userService.updateUser(user);
		return "success";
	}

	@RequestMapping(value = "/addUser.do")
	@RequiresPermissions("sys:user:add")
	public String addUser(){
		return "success";
	}
	@RequestMapping(value = "/deleteUser.do")
	@RequiresPermissions("sys:user:delete")
	public String deleteUser(){
		return "success";
	}
}
